export default function (data) {
    let valueList = data.valueList;
    let style = `
                <style>
                   .commonSearchWrap{
                        width: 9.2rem;
                        margin: 0.267rem auto;
                        height: 0.8rem;
                        position: relative;
                   }
                   .commonSearchInput{
                        width: 85%;
                        border: none;
                        float: left;
                        height: 0.8rem;
                        padding-left: 0.333rem;
                        box-sizing: border-box;
                   }
                   .searchBtn{
                    width: 15%;
                    float: left;
                    height: 0.8rem;
                    background: #008be6;
                    text-align: center;
                    line-height: 0.8rem;
                    color: white;
                    font-size: 0.267rem;
                   }
                   .searchResault{
                    position: absolute;
                    width: 85%;
                    left: 0;
                    bottom: -${valueList.length * 0.8}rem;
                    border: 0.013rem solid #000;
                    box-sizing: border-box;
                    margin: 0;
                    padding: 0;
                    background: white;
                   }
                   .searchResault li{
                    list-style: none;
                    height: 0.8rem;
                    font-size: 0.267rem;
                    line-height: 0.8rem;
                    padding-left: 0.333rem;
                    box-sizing: border-box;
                   }
                   .searchResault li:hover {
                     background: #008be6;
                     color: white;
                   }
                </style>
    `
    let searchLiString = '';
    valueList.forEach((item) => {
        searchLiString += `<li>${item}</li>`
    })
    console.log(searchLiString)
    let html = `
               <div class="commonSearchWrap">
                  <input type="text" class="commonSearchInput">
                  <span class="searchBtn">搜索</span>
                  <ul class="searchResault">
                  ${searchLiString}
                  </ul>
               </div>
                `;
    window.nbasics.differAction(() => {

    });
    return (`<div >${style}${html}</div>`);
}